<template>
          <div  class="container">
             <div class="header">
            <el-dropdown size="mini" split-button>
                <template #dropdown>
                    <el-dropdown-menu>
                        <el-dropdown-item>创建作品</el-dropdown-item>
                        <el-dropdown-item @click="hanedrUser">我的作品</el-dropdown-item>
                        <el-dropdown-item @click="handerClick">登出</el-dropdown-item>
                    </el-dropdown-menu>
                </template>
             </el-dropdown>
             </div>
          </div>
</template>
<script setup lang="ts">
import { defineComponent } from 'vue';
import {useRouter} from 'vue-router'
const router = useRouter()
const handerClick=()=>{
    localStorage.removeItem('LoginTime')
    router.push('/')
}
// 我的作品
const hanedrUser=()=>{
    router.push('/myuser')
} 
// 定义当前组件类型
const HeaderDropdown = defineComponent({
  name: 'HeaderDropdown',
});


</script>
<style lang="scss" scoped>
.container{ 
    color: #fff;
  .el-dropdown{
  }
}
</style>